package me.ratel.demo.wechat.entities;

import java.util.Objects;

/**
 * @author Administrator
 * @time 2016/9/15 14:37
 */
public enum ResponseCode {
    INVALID_CREDENTIAL(41001, "获取access_token时AppSecret错误，或者access_token无效。请开发者认真比对AppSecret的正确性，或查看是否正在为恰当的公众号调用接口");

    private Integer errCode;
    private String errMsg;

    ResponseCode(Integer errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public Integer getErrCode() {
        return errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public boolean sameWithErrCode(Integer errCode) {
        return Objects.equals(getErrCode(), errCode);
    }
}
